﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Follow.Common;
using Follow.Model;
using Follow.DataAccess;
using System.Transactions;

namespace Follow.Business
{
    public class ItemPropostaBO
    {
        public IList<ItemProposta> findByProposta(Int32 id)
        {
            ItemPropostaDAO dao = new ItemPropostaDAO();
            return dao.findByProposta(id);
        }

        public void delete(int id, int idUsuario)
        {
            ItemPropostaDAO dao = new ItemPropostaDAO();
            dao.delete(id, idUsuario);
        }

        public void save(ItemProposta ip, Int32 idlogin)
        {
            
            ItemPropostaDAO dao = new ItemPropostaDAO();

            if (ip.IDItemProposta == Int32.MinValue || ip.IDItemProposta.Equals(0))
            {
                dao.insert(ip, idlogin);
            }
           
        }

    }
}